<?php 
require "include/functions.php";
session_start();
//Save Log
$UserId = $_SESSION["valid_id"];
add_userlog('User Logout',$UserId);
session_destroy();

$time = 1.5; //Waits 2 seconds 
$url = "index.php"; //Redirects to main_login 
header("Refresh: $time; url=$url"); 


?>

<html>
<head>
<title>Home Electronics - Logout page</title>
<link rel="stylesheet" href="include/styles.css" type="text/css">
</head>
<body>
<div id="container" align="center">
   <div id="header">
		<div id="topmenu"><ul><?php top_menu(); ?></ul></div> 
		<div id="menu" align="right">
		<form name="form1" method="post" action="search.php">
		<tr>
		<td height="35" width="78"><a>Search Products</a></td>
		<td height="35" width="3">:</td>
		<td height="35" width="294"><input name="mysearch" type="text" id="mysearch">&nbsp;&nbsp;&nbsp;</td>
		</tr>
		</form>
		</div>
		<div id="menubar"> <!-- Menu buttons -->
  		<ul>
   		<li><a href="index.php" title="Home"><span>Home</span></a></li>
	    <li><a href="#" title="Computing"><span>Computing</span></a></li>
		<li><a href="#" title="Kitchen"><span>Kitchen</span></a></li>
		<li><a href="#" title="Bathroom"><span>Bathroom</span></a></li>
		<li><a href="#" title="Laundry"><span>Laundry</span></a></li>
		<li><a href="#" title="Furniture and Bedding"><span>Furniture & Bedding</span></a></li>
    	</ul>
		</div>
	</div> <!-- Header -->

	
	<div id="body" align="center">
		<div id="page">
			<?php 
			if ( $_SESSION['name'] != '' ) 
			{ 
			print('Successfully logged out of, '.ucfirst(strtolower($_SESSION["name"])).''); 
			} 
			?> 
		</div>
	</div> <!--body div -->
   		
   <? footer(); ?>
</div>
</body>
</html>
